import Vue from "vue";
import Vuex from 'Vuex'

Vue.use(Vuex)

const store = new Vuex.Store({

  state: {
    projectId: 0,
    projectName: '',
    apiGroupId: 0
  },

  mutations: {
    //项目ID
    SET_PROJECTID: (state, projectId) => {
      state.projectId = projectId
    },
    //项目名称
    SET_PROJECTNAME: (state, projectName) => {
      state.projectName = projectName
    },
    SET_APIGROUPID: (state, apiGroupId) => {
      state.apiGroupId = apiGroupId
    }
  },

  actions: {}
})

export default store

